package com.dhcc.bpm.modules.scf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.scf.dto.ScfTruckInfoDTO;
import com.dhcc.bpm.modules.scf.entity.ScfTruckInfo;
import com.dhcc.bpm.modules.scf.vo.ScfTruckInfoVO.ScfGetTruckDetailsVO;
import com.dhcc.bpm.modules.scf.vo.ScfTruckInfoVO.ScfGetTruckListVO;

import java.util.List;


/**
 *  车辆信息-Mapper接口
 *
 * @author liuguoting
 * @since 2023-09-12
 */
public interface ScfTruckInfoMapper extends BaseMapper<ScfTruckInfo> {
    /**
     * 自定义分页查询
     *
     * @param page
     * @param scfTruckInfo
     * @return
     */
    List<ScfGetTruckListVO> selectScfTruckInfoPage(IPage<ScfGetTruckListVO> page, ScfTruckInfoDTO scfTruckInfo);

    /**
     * 查看车辆详细信息
     *
     * @param rowId
     * @return
     */
    ScfGetTruckDetailsVO getDetails(String rowId);

    /**
     * 根据车牌号查询车辆编号（ROW_ID）用于判断是否已存在该车辆
     *
     * @param truckNum
     * @return
     */
    String selectRowIdByTruckNum(String truckNum ,String orgCode) ;

    boolean deleteByIds(String[] ids);

}
